From: Michael Natterer Date: Tue, 1 Jan 2019 18:15:40 +0000 (+0100) Subject: palette: allow a NULL space in babl_new_palette_with_space() X-Git-Tag: archive/raspbian/1%0.1.106-3+rpi1^2~15^2~12^2~4 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ce2d1d4e5c9fc001df5334fef0d1504e0da1b629;p=babl.git palette: allow a NULL space in babl_new_palette_with_space() --- diff --git a/babl/babl-palette.c b/babl/babl-palette.c index a53f654..d03ad1d 100644 --- a/babl/babl-palette.c +++ b/babl/babl-palette.c @@ -727,6 +727,9 @@ const Babl *babl_new_palette_with_space (const char *name, char cname[64]; + if (!space) + space = babl_space ("sRGB"); + if (!name) { static int cnt = 0; @@ -873,7 +876,7 @@ const Babl *babl_new_palette (const char *name, const Babl **format_u8, const Babl **format_u8_with_alpha) { - return babl_new_palette_with_space (name, babl_space("sRGB"), + return babl_new_palette_with_space (name, NULL, format_u8, format_u8_with_alpha); }